package com.wgt.service.authority;

import com.wgt.domain.Authority;
import com.wgt.repository.AuthorityRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wgt
 * @date 2018/1/4
 * @project new-start-blog
 */
@Service
public class AuthorityServiceImpl implements AuthorityService {

    @Autowired
    private AuthorityRepository authorityRepository;

    /**
     * 根据权限id获取权限实体
     * @param id
     * @return
     */
    @Override
    public Authority getAuthorityById(int id) {
        return authorityRepository.findOne(id);
    }
}
